<?php
/* @var $this MemberController */
/* @var $model Member*/
$this->breadcrumbs = array(
   'Quản lý sản phẩm' => '/index.php/admin/'.$this->id,
   'Thêm sản phẩm'
);

?>
<h1>Tạo danh mục</h1>
<div class="form" id="<?php echo Yii::app()->controller->id . '-' . Yii::app()->controller->action->id?>">
<?php
   $form = $this->beginWidget('CActiveForm',array(
      'enableClientValidation' => true,
      'clientOptions'=>array(
   		'validateOnSubmit'=>true,
   	),
      'id' => Yii::app()->controller->id . '_' . Yii::app()->controller->action->id )
   );
?>
   <p class="note">Những dòng đánh dấu <span class="required">*</span> là bắt buộc.</p>

	<?php echo $form->errorSummary($model,'Kiểm tra lại các giá trị bạn vừa nhập vào'); 
      if($message != ''){
         echo CHtml::tag('div', array('class'=>'message-success'),$message);
      }
   ?>
   <input name="action_user" type="hidden" value="" id="action_user" />
   <table>
      <tr>
         <td style="width: 150px;"><?php echo $form->labelEx($model, 'pro_code');?></td>
         <td><?php echo $form->textField($model,'pro_code');?></td>
      </tr>
      <tr>
         <td style="width: 150px;"><?php echo $form->labelEx($model, 'pro_name');?></td>
         <td><?php echo $form->textField($model,'pro_name');?></td>
      </tr>
      <tr>
         <td style="width: 150px;"><?php echo $form->labelEx($model, 'pro_cat_id');?></td>
         <td><?php echo $form->dropDownList($model, 'pro_cat_id',$tree_cate);?></td>
      </tr>
      <tr>
         <td style="width: 150px;"><?php echo $form->labelEx($model, 'pro_name');?></td>
         <td><?php echo $form->textField($model,'pro_price');?></td>
      </tr>
      <tr>
         <td style="width: 150px;"><?php echo $form->labelEx($model, 'pro_name');?></td>
         <td><?php echo $form->textField($model,'pro_origin');?></td>
      </tr>
      <tr>
         <td style="width: 150px;"><?php echo $form->labelEx($model, 'pro_gua');?></td>
         <td><?php echo $form->textField($model,'pro_gua');?></td>
      </tr>
      <tr>
            <td style="width: 150px;"><?php echo $form->labelEx($model, 'pro_pic');?></td>
            <td>
               <?php echo $form->textField($model, 'pro_pic',array('placeholder' => 'Đường dẫn ảnh','style' => 'width:250px'));?>
               <?php echo $form->fileField($model,'MenuIcon')?>
            </td>
         </tr>
      <tr>
         <td style="width: 150px;"><?php echo $form->labelEx($model, 'cat_name');?></td>
         <td><?php echo $form->textField($model,'cat_name');?></td>
      </tr>
      <tr>
         <td style="width: 150px;"><?php echo $form->labelEx($model, 'cat_title');?></td>
         <td><?php echo $form->textArea($model,'cat_title',array('cols' => 40, 'rows' => 5));?></td>
      </tr>
      <tr>
         <td style="width: 150px;"><?php echo $form->labelEx($model, 'pro_des');?></td>
         <td><?php echo $form->textArea($model,'pro_des',array('cols' => 40, 'rows' => 5));?></td>
      </tr>
      <tr>
         <td style="width: 150px;"><?php echo $form->labelEx($model, 'cat_active');?></td>
         <td><?php echo $form->checkBox($model, 'cat_active',array('checked' => 'checked'));?></td>
      </tr>
      <tr>
      </tr>
   </table>
<?php $this->endWidget(); ?>
</div>